<template>
  <!-- 把首页的每个模块都封装成组件，方便后期维护 -->
  <!-- 顶部通栏布局 -->
  <AppTopnav></AppTopnav>
   <!-- 公共头部 -->
  <AppHeader></AppHeader>
   <!-- 公共头部-吸顶 -->
   <AppHeaderSticky></AppHeaderSticky>
  <main>
     <!-- 二级路由坑位 -->
    <router-view></router-view>
  </main>
   <!-- 公共底部 -->
  <AppFooter></AppFooter>
</template>

<script>
import AppTopnav from '@/components/app-topnav.vue'
import AppHeader from '@/components/app-header.vue'
import AppFooter from '@/components/app-footer.vue'
import { useStore } from 'vuex'
import AppHeaderSticky from '@/components/app-header-sticky.vue'
export default {
  name: 'xtx-layout',
  components: { AppTopnav, AppHeader, AppFooter, AppHeaderSticky },
  setup () {
    const store = useStore()
    store.dispatch('category/getList')
  }
}
</script>

<style lang="less" scoped>

</style>
